package o;

import androidx.annotation.Nullable;
import o.aef.d;

public final class afe {
    public final boolean ˊ;
    public final byte[] ˋ;
    @Nullable
    public final String ˎ;
    public final d ˏ;
    public final int ॱ;

    public afe(boolean z, @Nullable String str, int i, byte[] bArr, int i2, int i3, @Nullable byte[] bArr2) {
        int i4 = 1;
        int i5 = i == 0 ? 1 : 0;
        if (bArr2 != null) {
            i4 = 0;
        }
        amm.ˊ(i4 ^ i5);
        this.ˊ = z;
        this.ˎ = str;
        this.ॱ = i;
        this.ˋ = bArr2;
        this.ˏ = new d(ˋ(str), bArr, i2, i3);
    }

    private static int ˋ(@Nullable String str) {
        if (str == null) {
            return 1;
        }
        int i = -1;
        switch (str.hashCode()) {
            case 3046605:
                if (str.equals("cbc1")) {
                    i = 2;
                    break;
                }
                break;
            case 3046671:
                if (str.equals("cbcs")) {
                    i = 3;
                    break;
                }
                break;
            case 3049879:
                if (str.equals("cenc")) {
                    i = 0;
                    break;
                }
                break;
            case 3049895:
                if (str.equals("cens")) {
                    i = 1;
                    break;
                }
                break;
        }
        switch (i) {
            case 0:
            case 1:
                return 1;
            case 2:
            case 3:
                return 2;
            default:
                amz.ˏ("TrackEncryptionBox", "Unsupported protection scheme type '" + str + "'. Assuming AES-CTR crypto mode.");
                return 1;
        }
    }
}
